<!DOCTYPE html>
<html>
<script src="${request.getContextPath()}/themes/admin/js/dateutil.js" type="text/javascript"></script>
<#include "../head.html">
<link rel="stylesheet" type="text/css" href="${webroot}/plugins/fancybox/jquery.fancybox-1.3.4.css" />
    <body class="full">
    <div class="mc">
        <div class="mc-l">
            <!--左侧导航---{-->
            <div id="navPanelContainer">
                <div class="system-logo cd"></div>
                <!--管理员信息---{-->
                <#include "../adminInfo.html">
                    <!--管理员信息---}-->
                    <div class="nav-wrap">
                        <#include "left.html">
                    </div>
            </div>
            <!--左侧导航---}-->
        </div>
        <div class="mc-m">
            <div class="navToggle"></div>
        </div>
        <div class="mc-r">
            <!--顶部导航---{-->
            <#include "../topNav.html">
                <!--顶部导航---}-->

                <!--面包屑导航---{-->
                <#assign moduleName="编辑产品">

                    <#include "banner.html">
                        <!--面包屑导航---}-->

                        <!--工具栏--{-->
                        <div id="toolbar" class="clearfix">

                            <div class="toolbor-module">


                            </div>
                        </div>
                        <!--工具栏--}-->

                        <div id="main" class="clearfix">
                            <form name="form1" method="post" action="/admin/operate/editBorrow.html" enctype="multipart/form-data">



                                <div id="audit">
                                    <div class="top">
                                        <strong>编辑产品</strong>
                                    </div>
                                    <div class="v">

                                        <div class="c">
                                            <div class="choose" style="margin-bottom: 10px;" >
                                                <label class="mr15">是否设置限额:</label>
                                                <span class="mr15" id="amountLimit">

                                            	  		<#if b.perDealMost gt 0>
                                            	  			<input type="radio"  id="perCount" name="mostLimit" value="1" checked="checked" data-checked="true">单笔最高限制
                                            	  			<input type="radio"  id="perPerson" name="mostLimit" value="2" >单人最高限制
                                            	  			<input type="radio"  id="noLimit" name="mostLimit" value="3" >没有限额
                                            	  			<input type="text"   id="mostAmout" name="mostAmout" value="${b.perDealMost?c}" >
                                            	  		<#elseif b.mostAccount gt 0>
                                            	  			<input type="radio"  id="perCount" name="mostLimit" value="1" >单笔最高限制
                                            	  			<input type="radio"  id="perPerson" name="mostLimit" value="2" checked="checked" data-checked="true">单人最高限制
                                            	  			<input type="radio"  id="noLimit" name="mostLimit" value="3" >没有限额
                                            	  			<input type="text"   id="mostAmout" name="mostAmout" value="${b.mostAccount?c}" >
                                            	  		<#else>
                                            	  			<input type="radio"  id="perCount" name="mostLimit" value="1" >单笔最高限制
                                            	  			<input type="radio"  id="perPerson" name="mostLimit" value="2" >单人最高限制
                                            	  			<input type="radio"  id="noLimit" name="mostLimit" value="3" checked="checked" data-checked="true">没有限额

                                            	  		</#if>

                                            	  </span>
                                            </div>

                                            <div class="choose" style="margin-bottom: 10px;">
                                                <label class="mr15">是否新手专享:</label>
                                                <span class="mr15">
                                            	  		<input type="radio"  name="isNewHand"  value="1" <#if b??&&b.isNewHand==1>checked="checked"</#if>>是
                                            	  		<input type="radio"  name="isNewHand"  value="0" <#if b??&&b.isNewHand==0>checked="checked"</#if>>否
                                            	  </span>
                                            </div>

                                        </div>
                                        <div class="other clearfix">
                                            <input type="hidden" name="id" value="${(b.id!0)?c}" />
                                            <input type="hidden" name="actionType" value="edit" />
                                            <input type="submit"  name="reset" value="确定" class="input-button confirm"/>
                                        </div>
                                    </div>
                                </div>

                            </form>

                            <script>
                                var mostAmout = $("#mostAmout").val();
                                $("#perCount").click(function(){
                                    fnVal(this);
                                    fnDomShow();
                                });

                                $("#perPerson").click(function(){
                                    fnVal(this);
                                    fnDomShow();
                                });

                                $("#noLimit").click(function(){
                                    fnVal(this);
                                    $("#mostAmout").hide();
                                });


                                function fnVal(_this){
                                    if($(_this).attr('data-checked')){
                                        $("#mostAmout").val(mostAmout);
                                    }else{
                                        $("#mostAmout").val('');
                                    }
                                }

                                function fnDomShow(){
                                    if($("#mostAmout").length > 0){
                                        $("#mostAmout").show();
                                    }else{
                                        $("#mostAmout").remove();
                                        $("#amountLimit").append('<input type="text" id="mostAmout" name="mostAmout" value="" >');
                                    }
                                }
                            </script>
                        </div>
        </div>
    </div>
    <div class="mc-b"><#include "../foot.html"></div>
    <div class="msgClass">${rsmsg!""}</div>
    <#include "../jsPage.html">
    </body>
</html>

